3.6.52 \(\int \frac {x^{-1+n}}{a+b x^n+c x^{2 n}} \, dx\) [552]

Optimal. Leaf size=39 \[ -\frac {2 \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} n} \]

[Out]

-2*arctanh((b+2*c*x^n)/(-4*a*c+b^2)^(1/2))/n/(-4*a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {1366, 632, 212} \begin {gather*} -\frac {2 \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{n \sqrt {b^2-4 a c}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 + n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(-2*ArcTanh[(b + 2*c*x^n)/Sqrt[b^2 - 4*a*c]])/(Sqrt[b^2 - 4*a*c]*n)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1366

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[(a + b*x +
 c*x^2)^p, x], x, x^n], x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[n2, 2*n] && EqQ[Simplify[m - n + 1], 0]

Rubi steps

\begin {align*} \int \frac {x^{-1+n}}{a+b x^n+c x^{2 n}} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^n\right )}{n}\\ &=-\frac {2 \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^n\right )}{n}\\ &=-\frac {2 \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 43, normalized size = 1.10 \begin {gather*} \frac {2 \tan ^{-1}\left (\frac {b+2 c x^n}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c} n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + n)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(2*ArcTan[(b + 2*c*x^n)/Sqrt[-b^2 + 4*a*c]])/(Sqrt[-b^2 + 4*a*c]*n)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(112\) vs. \(2(35)=70\).
time = 0.06, size = 113, normalized size = 2.90

method result size
risch \(-\frac {\ln \left (x^{n}+\frac {b^{2}-4 a c +b \sqrt {-4 a c +b^{2}}}{2 c \sqrt {-4 a c +b^{2}}}\right )}{\sqrt {-4 a c +b^{2}}\, n}+\frac {\ln \left (x^{n}+\frac {b \sqrt {-4 a c +b^{2}}+4 a c -b^{2}}{2 c \sqrt {-4 a c +b^{2}}}\right )}{\sqrt {-4 a c +b^{2}}\, n}\) \(113\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x,method=_RETURNVERBOSE)

[Out]

-1/(-4*a*c+b^2)^(1/2)/n*ln(x^n+1/2*(b^2-4*a*c+b*(-4*a*c+b^2)^(1/2))/c/(-4*a*c+b^2)^(1/2))+1/(-4*a*c+b^2)^(1/2)
/n*ln(x^n+1/2*(b*(-4*a*c+b^2)^(1/2)+4*a*c-b^2)/c/(-4*a*c+b^2)^(1/2))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

integrate(x^(n - 1)/(c*x^(2*n) + b*x^n + a), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (35) = 70\).
time = 0.35, size = 159, normalized size = 4.08 \begin {gather*} \left [\frac {\log \left (\frac {2 \, c^{2} x^{2 \, n} + b^{2} - 2 \, a c + 2 \, {\left (b c - \sqrt {b^{2} - 4 \, a c} c\right )} x^{n} - \sqrt {b^{2} - 4 \, a c} b}{c x^{2 \, n} + b x^{n} + a}\right )}{\sqrt {b^{2} - 4 \, a c} n}, -\frac {2 \, \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {2 \, \sqrt {-b^{2} + 4 \, a c} c x^{n} + \sqrt {-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right )}{{\left (b^{2} - 4 \, a c\right )} n}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

[log((2*c^2*x^(2*n) + b^2 - 2*a*c + 2*(b*c - sqrt(b^2 - 4*a*c)*c)*x^n - sqrt(b^2 - 4*a*c)*b)/(c*x^(2*n) + b*x^
n + a))/(sqrt(b^2 - 4*a*c)*n), -2*sqrt(-b^2 + 4*a*c)*arctan(-(2*sqrt(-b^2 + 4*a*c)*c*x^n + sqrt(-b^2 + 4*a*c)*
b)/(b^2 - 4*a*c))/((b^2 - 4*a*c)*n)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+n)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 4.31, size = 39, normalized size = 1.00 \begin {gather*} \frac {2 \, \arctan \left (\frac {2 \, c x^{n} + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+n)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

2*arctan((2*c*x^n + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*n)

________________________________________________________________________________________

Mupad [B]
time = 1.47, size = 39, normalized size = 1.00 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {b+2\,c\,x^n}{\sqrt {4\,a\,c-b^2}}\right )}{n\,\sqrt {4\,a\,c-b^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(n - 1)/(a + b*x^n + c*x^(2*n)),x)

[Out]

(2*atan((b + 2*c*x^n)/(4*a*c - b^2)^(1/2)))/(n*(4*a*c - b^2)^(1/2))

________________________________________________________________________________________